<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>文章列表管理Demo</title>
<link href="/assets/css/bootstrap.min.css" rel="stylesheet">

<script src="/assets/jquery/jquery.min.3.3.1.js"></script>
<script src="/assets/jquery/js/bootstrap.min.3.3.7.js"></script>

</head>
<body>
	<div class="container" style="margin-top: 30px;">
		<h1 style="text-align: center;">文章列表管理Demo
		<a class="btn btn-primary btn-md pull-right" href="article/edit">添加新文章</a>
		</h1>
		<table class="table table-bordered table-hover">
			<thead>
				<tr>
					<th>ID</th>
					<th>标题</th>
					<th>创建时间</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				
				#for(article : articles)
				   <tr>
					<td>#(article.id)</td>
					<td><a target="_blank" href="article/detail/#(article.id)">#(article.title)</a></td>
					<td>#date(article.createTime, "yyyy-MM-dd HH:mm:ss")</td>
					<td>
					<a href="/article/edit/#(article.id)">编辑</a>
					<a onclick="return confirm('确认删除？')" href="/article/del/#(article.id)">删除</a>
					</td>
					</tr>
				#end
				
				
			</tbody>
		</table>
	</div>
</body>
</html>